import Vue from 'vue'
import Router from 'vue-router'
import Home from './views/Home.vue'


Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'home',
      component: Home
    },
    {
      path: '/about',
      name: 'about',
      component: () => import('./views/About.vue')
    },
    {
      path: '/login',
      name: 'login',
      component: () => import( './views/login.vue')
    },
    {
      path: '/dashboard',
      name: 'dashboard',
      component: () => import( './views/index.vue'),
      children:[
        {
          path: '/dashboard/user',
          name: 'user',
          component: () => import( './views/user/user.vue')
        },
        {
          path: '/dashboard/order',
          name: 'order',
          component: () => import( './views/order/order.vue')
        },
        {
          path: '/dashboard/vip',
          name: 'vip',
          component: () => import( './views/user/vip.vue')
        }
      ]
    }
  ]
})
